﻿package frEngine.shader.filters.fragmentFilters.extra
{
    import __AS3__.vec.*;
    import frEngine.shader.*;
    import frEngine.shader.filters.*;

    public class ColorLightFilter extends FilterBase
    {
        public var colorOffsetValue:Vector.<Number>;

        public function ColorLightFilter()
        {
            this.colorOffsetValue = this.Vector.<Number>([0.5, 0.5, 0.5, 0.5]);
            super(FilterType.Fragment_ColorLight, FilterPriority.ColorLightFilter);
            return;
        }// end function

        override public function setRegisterParams(param1:Program3dRegisterInstance) : void
        {
            param1.getParamByName("{ColorLightValue}", false).value = this.colorOffsetValue;
            return;
        }// end function

        override public function get programeId() : String
        {
            return "ColorLightFilter";
        }// end function

        override public function createFragmentColor(param1:Program3dRegisterInstance, param2:Boolean) : String
        {
            var _loc_3:String = "";
            var _loc_4:* = new Array();
            _loc_4.push(new ToBuilderInfo("fc1", "{ColorLightValue}", false, 1, this.colorOffsetValue));
            _loc_3 = _loc_3 + "add           {output}.xyz       \t  \t{output}.xyz  \t\t  \t\tfc1.xyz\t\t\t\t\t\t\n";
            _loc_3 = param1.toBuild(_loc_3, _loc_4);
            return _loc_3;
        }// end function

    }
}
